API Specification
Components Involved
- NetNetServiceExe
- WCF REST Service
- ODIN Manager
Briefing on the Components
-
NetNetServiceExe
NetNetServiceExe is the same component which is used for Limit updation in ODIN. And the new WCF REST Service is used to send the user creation/modification packets to NetNetServiceExe.
📞🌐 Calling the WCF REST Service
Below is the code snippet for calling the WCF REST Service from client end. Client needs to add a Service Reference of this service in the project and add the below mentioned url in the service reference. On adding this reference, user management service methods will be exposed. Below is an example for calling the User Creation method. Pass the UserData string to this method as name value tag and pipe separated. This method in turn will provide a string response which will be name value tag and pipe separated.
URL to be added in the client configuration: http://<server_ip>/UserCreation.svc/soap
🧑💻 Code Snippet
private void CallRetailUserCreationService()
{
try
{
UserCreation.UserCreationClient objUserCreate = new UserCreation.UserCreationClient();
string strResponse = objUserCreate.CreateRetailUser("63=FT1.0|64=301|1=WEBUSER1|2=HO|3=");
}
catch(Exception ex)
{
// Handle exception
}
}
Further in this document more clarity has been provided on the entire Request string to be passed and the Response string.
🔐 Password Encryption Logic
-
Encryption Algorithm: AES Encryption
-
Password Encryption Key: ftUC@123
-
Password Encryption Key-2: @63MOONS1FTODIN9
Note: If the client uses JAVA Technology, they must:
-
Use Key-2 to encrypt the password.
-
Set value as KEY2 in tbl_ApplicationConfig table (ParamName: USERCREATION_THRU_API_ENCRYPTKEY).
Checksum Logic
public static String GenerateCheckSum(char[] buf, long bufLen)
{
try
{
char[] tmpBuf = new char[4];
long idx;
uint cks;
for (idx = 0L, cks = 0; idx < bufLen; cks += (uint)buf[idx++]) ;
cks = (uint)cks % 256;
return cks.ToString("d3");
}
catch (Exception ex)
{
// Handle exception
}
return "ERROR";
}
🧩 Code to generate the checksum logic
char[] arr = strRequestString.ToCharArray();
long length = arr.Length;
strRetValue = GenerateCheckSum(arr, length);
🔍 Assumptions
The mapping of respective General Settings Template to the Manager IP should exist in WebAdmin (as followed for User Migration process).
This will ease the process of user creation since:
- Single Interface Template mapping
- Communication mode
- 2FA & eBuzz Channel mapping
will be done directly through this. This minimizes the parameters that need to be sent to the service.